package vue;

import java.awt.BorderLayout;
import java.awt.EventQueue;

import javax.swing.JFrame;
import javax.swing.JPanel;
import javax.swing.border.EmptyBorder;
import java.awt.FlowLayout;
import javax.swing.BoxLayout;
import java.awt.GridLayout;
import javax.swing.JMenuBar;
import javax.swing.JButton;
import javax.swing.JTable;
import javax.swing.table.DefaultTableModel;
import javax.swing.JScrollPane;
import javax.swing.JTabbedPane;
import javax.swing.JLabel;
import java.awt.Font;
import javax.swing.JTextField;
import javax.swing.JTextArea;
import javax.swing.border.LineBorder;
import java.awt.Color;
import java.awt.event.ActionListener;
import java.awt.event.ActionEvent;

public class ModifierNews extends JFrame {

	private JPanel contentPane;
	private JTable table;
	private JTable table_1;
	private JTable table_2;
	private JTextField textField;

	/**
	 * Launch the application.
	 */
	/*public static void main(String[] args) {
		EventQueue.invokeLater(new Runnable() {
			public void run() {
				try {
					ModifierNews frame = new ModifierNews();
					frame.setVisible(true);
				} catch (Exception e) {
					e.printStackTrace();
				}
			}
		});
	}*/
	public void close()
	{
		this.dispose();
	}
	public void refreshPage()
	{
		this.repaint();
	}
	/**
	 * Create the frame.
	 */
	public ModifierNews() {
		setTitle("Modifier News");
		setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
		setBounds(100, 100, 894, 656);
		contentPane = new JPanel();
		contentPane.setBorder(new EmptyBorder(5, 5, 5, 5));
		setContentPane(contentPane);
		contentPane.setLayout(null);
		
		JPanel panel = new JPanel();
		panel.setBounds(0, 0, 234, 30);
		contentPane.add(panel);
		panel.setLayout(new BorderLayout(0, 0));
		
		JMenuBar menuBar = new JMenuBar();
		panel.add(menuBar, BorderLayout.NORTH);
		
		JButton btnNewButton = new JButton("Accueil");
		btnNewButton.addActionListener(new ActionListener() {
			public void actionPerformed(ActionEvent arg0) {
				Accueil accueilVue = new Accueil();
				accueilVue.setVisible(true);
				close();
			}
		});
		menuBar.add(btnNewButton);
		
		JButton btnNewButton_1 = new JButton("Consulter");
		btnNewButton_1.addActionListener(new ActionListener() {
			public void actionPerformed(ActionEvent arg0) {
				Consulter consulterVue = new Consulter();
				consulterVue.setVisible(true);
				close();
			}
		});
		menuBar.add(btnNewButton_1);
		
		JButton btnNewButton_2 = new JButton("Editer");
		btnNewButton_2.addActionListener(new ActionListener() {
			public void actionPerformed(ActionEvent arg0) {
				Editer editerVue = new Editer();
				editerVue.setVisible(true);
				close();
			}
		});
		menuBar.add(btnNewButton_2);
		
		JPanel panel_1 = new JPanel();
		panel_1.setBounds(57, 95, 390, 310);
		contentPane.add(panel_1);
		panel_1.setLayout(null);
		
		JTabbedPane tabbedPane = new JTabbedPane(JTabbedPane.TOP);
		tabbedPane.setBounds(26, 33, 288, 194);
		panel_1.add(tabbedPane);
		
		JScrollPane scrollPane = new JScrollPane();
		tabbedPane.addTab("Lieu", null, scrollPane, null);
		
		table = new JTable();
		scrollPane.setViewportView(table);
		table.setModel(new DefaultTableModel(
			new Object[][] {
			},
			new String[] {
				"Lieu"
			}
		) {
			boolean[] columnEditables = new boolean[] {
				false
			};
			public boolean isCellEditable(int row, int column) {
				return columnEditables[column];
			}
		});
		
		JPanel panel_2 = new JPanel();
		tabbedPane.addTab("Point d'interet", null, panel_2, null);
		panel_2.setLayout(null);
		
		JScrollPane scrollPane_1 = new JScrollPane();
		scrollPane_1.setBounds(0, 0, 283, 166);
		panel_2.add(scrollPane_1);
		
		table_1 = new JTable();
		scrollPane_1.setViewportView(table_1);
		table_1.setModel(new DefaultTableModel(
			new Object[][] {
			},
			new String[] {
				"Point d'inter\u00EAt"
			}
		) {
			boolean[] columnEditables = new boolean[] {
				false
			};
			public boolean isCellEditable(int row, int column) {
				return columnEditables[column];
			}
		});
		
		JPanel panel_3 = new JPanel();
		tabbedPane.addTab("Parcours", null, panel_3, null);
		panel_3.setLayout(null);
		
		JScrollPane scrollPane_2 = new JScrollPane();
		scrollPane_2.setBounds(0, 0, 283, 166);
		panel_3.add(scrollPane_2);
		
		table_2 = new JTable();
		scrollPane_2.setViewportView(table_2);
		table_2.setModel(new DefaultTableModel(
			new Object[][] {
			},
			new String[] {
				"Parcours"
			}
		) {
			boolean[] columnEditables = new boolean[] {
				false
			};
			public boolean isCellEditable(int row, int column) {
				return columnEditables[column];
			}
		});
		
		JButton btnValider = new JButton("Valider");
		btnValider.setBounds(425, 512, 89, 23);
		contentPane.add(btnValider);
		
		JLabel lblModifierNews = new JLabel("Modifier News");
		lblModifierNews.setFont(new Font("Tahoma", Font.PLAIN, 18));
		lblModifierNews.setBounds(400, 51, 133, 23);
		contentPane.add(lblModifierNews);
		
		JPanel panel_4 = new JPanel();
		panel_4.setBounds(559, 95, 309, 406);
		contentPane.add(panel_4);
		panel_4.setLayout(null);
		
		JLabel lblLibelle = new JLabel("Libelle : ");
		lblLibelle.setBounds(10, 11, 61, 14);
		panel_4.add(lblLibelle);
		
		textField = new JTextField();
		textField.setBounds(68, 8, 132, 20);
		panel_4.add(textField);
		textField.setColumns(10);
		
		JLabel lblDesscriptif = new JLabel("Descriptif : ");
		lblDesscriptif.setBounds(10, 44, 90, 14);
		panel_4.add(lblDesscriptif);
		
		JTextArea textArea = new JTextArea();
		textArea.setBounds(10, 69, 279, 134);
		panel_4.add(textArea);
		
		JLabel lblImage = new JLabel("Image : ");
		lblImage.setBounds(10, 228, 46, 14);
		panel_4.add(lblImage);
		
		JPanel panel_5 = new JPanel();
		panel_5.setBorder(new LineBorder(new Color(0, 0, 0)));
		panel_5.setBounds(10, 253, 279, 142);
		panel_4.add(panel_5);
		
		JButton btnBrowse = new JButton("Browse");
		btnBrowse.setBounds(176, 224, 89, 23);
		panel_4.add(btnBrowse);
	}
}
